{extend name="layout"/}
{block name="css"}
<style>

</style>
{/block}

{block name="content"}
<div class="panel">
    <div class="panel-heading">
        <span class="panel-title">TAG批量导入数据</span>
        <div class="panel-heading-controls"> 
            <a class="btn btn-xs btn-primary" href="__UPLOAD__/temp/tags_demo.xlsx"><i class="fa fa-cloud-download"></i> 导入格式</a>
        </div>
    </div>

    <form action="" enctype="multipart/form-data" method="post" class="panel-body">
        <div class="form-group">
            <fieldset class="form-group">
                <label>所属模型</label>
                <select class="custom-select form-control" name="mid">
                    <option value="0">=所有栏目模型=</option>
                    {volist name="mlist" id="vo"}
                       <option value="{$key}">{$vo}</option>
                    {/volist}
                </select>
            </fieldset>
            <fieldset class="form-group">
                <label class="custom-file px-file">
                    <input type="file" name="tags" class="custom-file-input">
                    <span class="custom-file-control form-control">选择要导入的数据文件...</span>
                    <div class="px-file-buttons">
                        <button type="button" class="btn px-file-clear">清空</button>
                        <button type="button" class="btn btn-primary px-file-browse">浏览文件</button>
                    </div>
                    <small class="text-muted">支持格式：xlsx,xls,csv</small>
                </label>
            </fieldset>
        </div>
        <div class="panel-footer text-right">
            <input type="submit" class="btn btn-primary" value="导入数据">
        </div>
    </form>
</div>
{/block}

{block name="javascript"}
<script>
    $(function () {
        $('.custom-file').pxFile();
        $('#cname').select2({
            placeholder: '选择栏目'
        });
    });
</script>
{/block}